<%--
  Created by IntelliJ IDEA.
  User: 何祥
  Date: 2022/4/20
  Time: 15:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>

<head>
    <meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
    <title>员工办理入职页面</title>
    <script src="/js/jquery-1.7.2.min.js"></script>
</head>

<body>

    <div align="center">新员工入职办理</div><br>

    <form method="post" action="http://qxtice.natappfree.cc/xm/user/saveUser">

        <table border="1" align="center">

            <tr align="center">
                <td>姓名</td>
                <td>
                    <input id="name" name="name" type="text"/>
                </td>
                <td style="color: red">${nameError}</td>
            </tr>


            <tr align="center">
                <td>工号</td>
                <td>
                    <input id="no" name="no" type="text"/>
                </td>
                <td style="color: red">${noError}</td>
            </tr>


            <tr align="center">
                <td>职位</td>
                <td>
                    <input id="position" name="position" type="text"/>
                </td>
                <td style="color: red">${positionError}</td>
            </tr>


            <tr align="center">
                <td></td>
                <td>
                    <input id="join" type="submit" value="提交" />
                </td>
                <td></td>
            </tr>

        </table>

    </form>

</body>

<script>

    /*实现保存按钮功能*/
    /*$("#join").click(function () {

        var name = $("#name").val();
        var no = $("#no").val();
        var position = $("#position").val();

        var url = "http://localhost:8080/user/saveUser";
        var data = {
            "name":name,
            "no":no,
            "position":position
        }

        $.ajax({
            type:"post",
            url:url,
            data:JSON.stringify(data),
            success:function (data){
                var url = "http://localhost:8080/user/findAllUser";
                window.open(url,'_self');
            }
        })

    })*/

</script>

</html>
